package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xmy.cultivate.respons.FlowRs;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 报销申请
 * </p>
 *
 * @author hpiggy
 * @since 2025-01-01
 */
@Data
@TableName("audit_claim")
@ApiModel(value = "AuditClaim对象", description = "报销申请")
public class AuditClaim implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private Long flowId;

    @ApiModelProperty("校区id")
    private Long schoolId;

    @ApiModelProperty("所属部门id【校区选总部时才添加】")
    private Long departId;

    @ApiModelProperty("科目id")
    private Long subjectsId;

    @ApiModelProperty("报销人【申请人】")
    private Long applyId;

    @ApiModelProperty("报销日期")
    private LocalDate claimDate;

    @ApiModelProperty("收款帐户：audit_receivable_account表id")
    private Long receivableAccountId;

    @ApiModelProperty("报销类型")
    private Integer clainmType;

    @ApiModelProperty("报销类型名称")
    private String clainmTypeName;

    @ApiModelProperty("费用明细")
    private String costDetail;

    @ApiModelProperty("报销金额")
    private BigDecimal clainmMoney;

    @ApiModelProperty("是否有纸质发票、收据")
    private Integer isHasInvoice;

    @ApiModelProperty("执行到了第几步")
    private Integer arriveStep;

    @ApiModelProperty("审核步骤数量")
    private Integer stepNum;

    @ApiModelProperty("企业微信推送内容")
    private String pushMsg;

    @ApiModelProperty("当前表为1，【1：报销申请，2：付款申请，3：备用金申请，4：学员退费申请】合并表查询使用")
    private Integer type;

    @ApiModelProperty("0未完成，1已完成，2被拒绝")
    private Integer status;

    @ApiModelProperty("拒绝理由")
    private String reason;

    @ApiModelProperty("版本号")
    private Integer versionNum;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建人id")
    private Long createdId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @ApiModelProperty("是否删除，0正常，1删除")
    @TableLogic(value = "0", delval = "1")
    @TableField(select = false)
    private Integer deleted;

    @ApiModelProperty("图片集合（发票、收据、截图）")
    @TableField(exist = false)
    private List<AuditPhoto> imageList;

    @ApiModelProperty("发起人姓名（登陆人）")
    @TableField(exist = false)
    private String teacherName;

    @ApiModelProperty("报销人姓名")
    @TableField(exist = false)
    private String applyName;

    @ApiModelProperty("校区名字")
    @TableField(exist = false)
    private String schoolName;

    @ApiModelProperty("部门名字")
    @TableField(exist = false)
    private String departName;

    @ApiModelProperty("账户名")
    @TableField(exist = false)
    private String accountName;

    @ApiModelProperty("账户")
    @TableField(exist = false)
    private String accountNo;

    @ApiModelProperty("审批流程")
    @TableField(exist = false)
    private List<FlowRs> flowDetailList;

    @ApiModelProperty("待审核人")
    @TableField(exist = false)
    private List<String> stayCheckNameList;

    @ApiModelProperty("待处理的数量")
    @TableField(exist = false)
    private Integer pendingCount;

    @ApiModelProperty("已处理的数量")
    @TableField(exist = false)
    private Integer processedCount;

    @ApiModelProperty("已发起的数量")
    @TableField(exist = false)
    private Integer sponsorCount;

    @ApiModelProperty("我收到的数量")
    @TableField(exist = false)
    private Integer sendCount;

    @ApiModelProperty("待处理的最小日期")
    @TableField(exist = false)
    private LocalDate pendingDate;

    @ApiModelProperty("已处理的最小日期")
    @TableField(exist = false)
    private LocalDate processedDate;

    @ApiModelProperty("已发起的最小日期")
    @TableField(exist = false)
    private LocalDate sponsorDate;

    @ApiModelProperty("我收到的最小日期")
    @TableField(exist = false)
    private LocalDate sendDate;

}
